import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Main from '../components/Main'
import MainWindows from '../components/MainWindows'
import Models from '../components/Models'
import Data from '../components/Data'
import Simulation from '../components/Simulation'
import Login from '../components/Login'
import ResultShower from '../components/ResultShower'
import SimulationaResultShower from '../components/showercompoents/SimulationaResultShower'
import UserSpaceMain from '../components/UserSpqce/UserSpaceMain'
Vue.use(VueRouter)

const routes = [
  //   {
  //   path: '/',
  //   redirect: "/models"
  // },
  {
    path: '/',
    redirect: "/login"
  },
  {
    path: '/login',
    name: 'Login',
    component: Login
  },
  {
    path: '/mainwindows',
    name: 'MainWindows',
    component: MainWindows,
    children: [
      {
        path: '/about',
        name: 'About',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: () => import( /* webpackChunkName: "about" */ '../views/About.vue')
      },
      {
        path: '/models',
        name: 'Models',
        component: Models
      },
      {
        path: '/data',
        name: 'Data',
        component: Data
      },
      {
        path: '/simulation',
        name: 'Simulation',
        component: Simulation
      }, {
        path: '/userspacemain',
        name: 'UserSpaceMain',
        component: UserSpaceMain

      }


    ]
  },
  {
    path: '/SimulationaResultShower',
    name: 'SimulationaResultShower',
    component: SimulationaResultShower
  },
  {
    path: '/ResultShower',
    name: 'ResultShower',
    component: ResultShower
  },
  {
    path: '/main',
    name: 'Main',
    component: Main
  }

]

const router = new VueRouter({
  routes
})

export default router